ABSTRACT: The following data maps commercial parking locations in Cambridge, polygon data of metered parking spots, and boundaries for green, open spaces (including parks). We were curious to see the relationship between available Cambridge parking and locations of open/green space.
Comparing the geographic distribution of space for parked cars versus space for people, plants, and animals yielded interesting insights into land use priorities. For example, much of Cambridge’s metered parking locations only reinforce the existing commercial parking, the majority of which are located away from open spaces. Based on our graphs, the open spaces in Cambridge seem to be only accessible to those who can walk or bike. This finding, although simple, is important in realizing that the open spaces (which are often public spaces) exclude populations of people who may be commuting in to Cambridge or who live away from these parks. Do the public spaces in Cambridge truly function as public spaces?
GROUP CONTRIBUTION: Mike and Jeb contributed equally to this project. They both created code, formatted maps, and wrote text. 10 points each.
VERSION 01
Our first attempt at the map demonstrates how important formatting maps can be in communicating information effectively. In this example, the basemap distracts from the other layers and it is hard to distinguish what the map's features represent. The open space polygons are colored blue, which might be confused with water. The commercial parking points are too large and the star shape adds unnecessary visual complexity, which distracts from the overall goals of the map: the metered parking polygons, in comparison, are almost invisible.
ggplot() +
#TITLE
ggtitle("CAMBRIDGE PARK [ ING ]") +
theme(
plot.title = element_text(
color="black",
size=10,
face="bold", #FONT FACE OPTIONS = PLAIN, BOLD, BOLD.ITALIC, ITALIC
vjust = 5,
hjust = .5))+
#BASE MAP
annotation_map_tile(
zoomin = 0,
progress = "none",
type = "stamenwatercolor",
alpha = .5) +
geom_sf() +
labs(caption = "Map tiles by Stamen Design. Data by OpenStreetMap") +
#DATA
geom_sf(
data = openspace,
color = NA,
alpha = 0.5,
aes(fill = "Open Space")
) +
geom_sf(
data = meters,
color = NA,
shape = NA,
aes(fill = "Metered Parking")
) +
geom_sf(
data = commercialparking,
shape = 11,
size = 5,
fill = NA,
aes(color = "Commercial Parking")
) +
scale_fill_manual(values = c("brown1", "blue"), name = "") +
scale_color_manual(values = "brown1", name = "") +
theme_void()
VERSION 02
This next map uses a high contrast dark theme and increased the dpi output for the R markdown chunk, in hopes of crisper data information. Open space polygons and commercial parking points pop from the page, while the metered parking more subtly suggests denser corridors, where people will pay to park on the street. While the map includes the names of neighborhoods and districts, the words are very faint and almost illegible. While the dark color scheme helps the map features stand out, the base map loses relevance as a map and serves more as a background color.
ggplot() +
ggtitle("Cambridge Park(ing)") +
#BASE MAP
annotation_map_tile(
zoomin = 0,
progress = "none",
type = "cartodark") +
geom_sf() +
labs(caption = "Map tiles and data by OpenStreetMap") +
#DATA
geom_sf(
data = openspace,
color = NA,
alpha = 0.6,
aes(fill = "Open Space")
) +
geom_sf(
data = meters,
fill = "white",
aes(color = "Parking Meters")
) +
geom_sf(
data = commercialparking,
shape = 20,
size = 3,
aes(color = "Commercial Parking")
) +
scale_color_manual(values = c("deeppink", "darkviolet"), name = "") +
scale_fill_manual(values = "chartreuse", name = "") +
theme_void()
VERSION 03
This next map uses a toned-down palette and the faint basemap allows basic geographic features like water areas to show through. In addition, the simple basemap allows the viewer to focus on the point and polygon layers atop it. In this version, we changed the symbology of the metered parking polygons to have just a fill with no outline in order to the true size of the parking spaces, but makes them a bit hard to find.
ggplot() +
ggtitle("Cambridge Park(ing)") +
#BASE MAP
annotation_map_tile(
zoomin = 0,
progress = "none",
type = "cartolight") +
geom_sf() +
labs(caption = "Map tiles and data by OpenStreetMap") +
#DATA
geom_sf(
data = openspace,
color = NA,
alpha = 0.5,
aes(fill = "Open Space")
) +
geom_sf(
data = meters,
color = NA,
shape = NA,
aes(fill = "Metered Parking")
) +
geom_sf(
data = commercialparking,
shape = 3,
size = 2,
fill = NA,
aes(color = "Commercial Parking")
) +
scale_fill_manual(values = c("brown3", "forestgreen"), name = "") +
scale_color_manual(values = "brown1", name = "") +
theme_void()
VERSION 04
To test a new representation of the metered parking spaces, we derived the centroids of each metered parking polygon. This means that metered parking now appears as points, like the commercial parking layer. The lighter blue color distinguishes metered parking from commercial parking, while keeping them in the same visual category (i.e. blue tones = parking). For an unknown reason, the centroid points become black and deformed when a basemap was added, so we removed the basemap and reinserted coordinate marks for context.
#finding centroids of metered parking polygons
ggplot(st_centroid(meters)) +
geom_sf(
size = 0.1,
shape = 20,
aes(color = "Metered Parking"),
alpha = .5
) +
#TITLE
ggtitle("CAMBRIDGE PARK [ ING ]") +
theme(
plot.title = element_text(
color="black",
size=11,
face="bold", #FONT FACE OPTIONS = PLAIN, BOLD, BOLD.ITALIC, ITALIC
))+
#FORMAT TEXT + LABELS
easy_center_title()+
easy_move_legend("right")+
easy_x_axis_labels_size(8)+
easy_y_axis_labels_size(8)+
#open space and commercial parking
geom_sf(
data = openspace,
color = NA,
aes(fill = "Open Space"),
alpha =.3,
) +
geom_sf(
data = commercialparking,
shape = 20,
size = 3,
aes(color = "Commercial Parking"),
) +
#LEGEND
scale_color_manual(values = c("cyan4", "mediumturquoise"), name = "") +
scale_fill_manual(values = "forestgreen", name = "") +
theme(panel.background = element_rect(fill = "white"),
legend.key = element_rect(fill = "white"))
VERSION 05
In the fifth version, we formatted a gray background to help the map stand out on the page, adjusting text size and label fonts so that the focus of the image remains on the map. We added a scale bar and a north arrow for orientation, allowing map users to quickly understand the density and size of the parking spots in relation to the parks. We added outlines to the open space, so that adjacent open spaces may be read as such. In this version, we chose to represent parking with warmer colors, so that there is a strong visual contrast between the open spaces (green) and those spaces paved and occupied for parking (warm color tones). We also added the boundary of Cambride in a light black, to highlight the municipal boundary of the city.
ggplot(st_centroid(meters)) +
#metered parking
geom_sf(
size = 0.1,
shape = 20,
aes(color = "Metered Parking"),
alpha = .75
) +
#commercial parking
geom_sf(data = commercialparking,
aes(color="Commercial Parking Lots"),
alpha = .5,
size = 2,
fill = NA,
) +
#open space
geom_sf(
data = openspace,
aes(fill="Parks"),
alpha = 0.25,
color = "aquamarine4"
) +
#city boundary
geom_sf(
data = Cambridge,
fill = NA,
color = "black",
line_width = .5,
alpha = 0.25,
) +
#TITLE + AXIS LABELS
#TITLE
ggtitle("CAMBRIDGE PARKING IN RELATION TO OPEN SPACE") +
theme(
#ADJUST TITLE
plot.title = element_text(
color="black",
size=10,
face="bold", #FONT FACE OPTIONS = PLAIN, BOLD, BOLD.ITALIC, ITALIC
vjust = 5,
hjust = .5))+
theme(plot.margin = unit(c(1,1,1,1), "cm"),
#CREATE BACKGROUND
plot.background = element_rect(
fill = "gray95",
colour = "black",
size = 1
),
panel.background = element_rect(fill = "grey92", colour = NA))+
#X AXIS
# xlab("LONGITUDE") +
# theme(
# axis.title.x = element_text(
# size=7,
# vjust = -2.5)) +
#Y AXIS
# ylab("LATITUDE")+
# theme(
# axis.title.y = element_text(
# size=7,
# vjust = 5)) +
#FORMAT TEXT + LABELS
easy_center_title()+
easy_move_legend("right")+
easy_x_axis_labels_size(7)+
easy_y_axis_labels_size(7)+
#BASE MAP
annotation_map_tile(
zoomin = 0,
progress = "none",
type = "cartolight",
alpha = .5)+
#CAPTION
labs(
caption = "Map tiles and data by OpenStreetMap",
size = .125)+
theme(plot.caption = element_text(
color = "grey50",
face = "italic",
size = 7))+
#APPEARANCE
#themes
scale_color_manual(values = c("darkorange1", "brown2"), name = "") +
scale_fill_manual(values = "green", name = "") +
#add a scale
annotation_scale(location = "bl",
width_hint = 0.5,
height = unit(0.125,"cm"),
line_width = .125)+
#add an arrow
annotation_north_arrow(
pad_x = unit(9, "cm"),
pad_y = unit(.25, "cm"),
height = unit(0.5, "cm"),
width = unit(0.5, "cm"),
#north arrow style
style = north_arrow_orienteering(
text_size = 1))+
theme(panel.background = element_rect(fill = "white", color = "black"),
legend.background = element_rect(fill = "grey95", color = NULL))